//
//  UIImage+MWPhotoBrowser.m
//  Pods
//
//  Created by Michael Waterfall on 05/07/2015.
//
//

#import "UIImage+MWPhotoBrowser.h"

@implementation UIImage (MWPhotoBrowser)
+ (UIImage *)imageForResourcePath:(NSString *)resource ofType:(NSString *)type inImageName:(NSString *)imageName
{
    NSString *path = [[NSBundle mainBundle] pathForResource:resource ofType:@"bundle"];
    NSBundle *bundle1 = [NSBundle bundleWithPath:path];
    NSString *file = [bundle1 pathForResource:imageName ofType:type];
    return [UIImage imageWithContentsOfFile:file];
}

+ (UIImage *)clearImageWithSize:(CGSize)size {
    UIGraphicsBeginImageContextWithOptions(size, NO, [UIScreen mainScreen].scale);
    UIImage *blank = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return blank;
}

@end
